package edu.java.homework.hw04.classes;

public class Test {

    /**
     * test classes in homework4 related with creation of classes in Java
     */
    public static void main(String[] args) {
	/*
	// --- Point2D ---------------------------------------------------------
	Point2D pnt1=new Point2D();
	System.out.println(pnt1);
	
	Point2D pnt2=new Point2D(2.5, -0.9);
	System.out.println(pnt2);
	
	System.out.printf("pnt1.equals(pnt2) : %b%n", pnt1.equals(pnt2));
	System.out.printf("pnt1==pnt2 : %b%n", pnt1==pnt2);
	
	Point2D pnt3=pnt2;
	System.out.println("pnt2.equals(pnt3):" + pnt2.equals(pnt3));
	System.out.println("pnt2==pnt3 : " + (pnt2==pnt3) );
	
	Point2D pnt4= new Point2D(2.5, -0.9);
	System.out.println("pnt2.equals(pnt4):" + pnt2.equals(pnt4));
	System.out.println("pnt2==pnt4 : " + (pnt2==pnt4) );
	*/
	
	// --- Segment2D -------------------------------------------------------
	Point2D pnt5=new Point2D(0,1);
	Point2D pnt6=new Point2D(5,6);
	
	Segment2D segment1= new Segment2D();
	System.out.println("Segment1: " + segment1);
	
	Segment2D segment2= new Segment2D(10,11,12,13);
	System.out.println("Segment2: " + segment2);
	
	Segment2D segment3= new Segment2D(pnt5, pnt6);
	System.out.println("Segment3: " + segment3);
	
	pnt5= new Point2D(7,8);
	pnt6= new Point2D(20,21);
	System.out.println("Segment3: " + segment3);
	
	pnt5.setCoordX(7);
	pnt5.setCoordY(8);
	pnt6.setCoordX(20);
	pnt6.setCoordY(21);
	System.out.println("Segment3: " + segment3);
	
    }

}














